package com.probox.common.core.enums;

public enum DeliverMethodEnum {
    //express快递、ziti自提、logistics物流
    express("express", "快递"),
    ziti("ziti", "自提"),
    paper("paper", "纸质发票"),
    electron("electron", "电子发票");

    //logistics("logistics","物流");
    private DeliverMethodEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for (DeliverMethodEnum oe : DeliverMethodEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
